﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using CounterStrikeSourceAimbot;
using CounterStrikeSourceAimbot.Speech;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            var recZr = new LiveSpeechRecognizer();

            recZr.Start();
            recZr.SpeechRecognized += (a, b) => Console.WriteLine(b.Result.Text);

            Console.ReadKey();

            var num = 0x1711C140+0x788 + 0x30*14 + 0x0C;

            var prc = System.Diagnostics.Process.GetProcessesByName("hl2");

            if (prc.Length == 0)
            {
                Console.WriteLine("hl2.exe not found!");
                Console.ReadKey();
                return;
            }

            if (prc.Length > 1)
            {
                Console.WriteLine("multiple hl2.exe found!");
                Console.ReadKey();
                return;
            }

            var engine = new MemoryEngine(prc.First());
            //engine.PlayerListStartAddress = 260405560;

            var address = engine.FindPlayerListAddress("epsi1on");
            var hexAddress = MathUtil.IntToHex(address);
        }
    }
}
